import api from "./api"
import axios from "../../../axios";


//类型查找新闻列表 
export const TypeListQuery = (params) => {
    return axios({
        method: "get",
        url: api.New.TypeNews,
        params,
        headers: {
            "Authorization": window.localStorage.getItem('token')
        }
    })
}


//根据获取新闻详情


export const TypeListID = (id) => {
    return axios({
        method: "get",
        url: api.New.TypeNewsId + id,
        headers: {
            "Authorization": window.localStorage.getItem('token')
        }
    })
}


//评论列表

export const CommentList = (params) => {

    return axios({
        method: 'get',
        url: api.New.Comment,
        params,
        headers: {
            "Authorization": window.localStorage.getItem('token')
        }
    })
}


///新增评论

export const NewComment = (data) => {

    return axios({
        method: 'post',
        url: api.New.newComment,
        data,
        headers: {
            "Authorization": window.localStorage.getItem('token')
        }
    })
}

 